//	Ordinaire.ExceptionMessage
//	Copyright (c) 2008 Jonathan Loe
//
//	MIT license (http://en.wikipedia.org/wiki/MIT_License)
//
//	Permission is hereby granted, free of charge, to any person obtaining a copy
//	of this software and associated documentation files (the "Software"), to deal
//	in the Software without restriction, including without limitation the rights 
//	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
//	of the Software, and to permit persons to whom the Software is furnished to do so, 
//	subject to the following conditions:
//
//	The above copyright notice and this permission notice shall be included in all 
//	copies or substantial portions of the Software.
//
//	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
//	INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
//	PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 
//	FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
//	ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Text;
using System.Threading;

namespace Ordinaire
{
	/// <summary>
	/// ExceptionMessage is a lookup class merely to manage the exception messages kept in resource file.
	/// </summary>
	public class ExceptionMessage
    {
        #region Constructor

        /// <summary>
        /// Hide constructor.
        /// </summary>
        private ExceptionMessage() { }

        #endregion

        #region Internal

        internal static string InvalidConnectionNameInConfigFormat
		{
			get { return OResourceManager.Instance.GetString("001"); }
		}

		internal static string NoConnectionStringInConfig
		{
			get { return OResourceManager.Instance.GetString("002"); }
		}

		internal static string EmptyConnectionString
		{
			get { return OResourceManager.Instance.GetString("003"); }
		}

		internal static string EmptyConnectionName
		{
			get { return OResourceManager.Instance.GetString("004"); }
		}

        internal static string EmptyConnectionStringInConfigFormat
        {
            get { return OResourceManager.Instance.GetString("005"); }
        }

        internal static string NullOrEmptyListFormat
        {
            get { return OResourceManager.Instance.GetString("006"); }
        }

		internal static string NoMatchingFieldNameFormat
		{
			get { return OResourceManager.Instance.GetString("007"); }
		}

        /// <summary>
        /// Returns common error message when no matching attribute found.
        /// params: (0) attribute class name (1) instance class name
        /// </summary>
        internal static string NoMatchingAttribute
        {
            get { return OResourceManager.Instance.GetString("031"); }
        }

		internal static string NoFieldToFormat
		{
			get { return OResourceManager.Instance.GetString("008"); }
		}

		internal static string DatabaseTransactionStarted
		{
			get { return OResourceManager.Instance.GetString("009"); }
		}

		internal static string DatabaseTransactionNotStarted
		{
			get { return OResourceManager.Instance.GetString("010"); }
		}

		internal static string InvalidElementFormat
		{
			get { return OResourceManager.Instance.GetString("011"); }
		}

		internal static string MissingElementFormat
		{
			get { return OResourceManager.Instance.GetString("012"); }
		}

		internal static string MissingAttributeInElementFormat
		{
			get { return OResourceManager.Instance.GetString("013"); }
		}

		internal static string EmptyAttributeInElementFormat
		{
			get { return OResourceManager.Instance.GetString("014"); }
		}

		internal static string InvalidMappingNameFormat
		{
			get { return OResourceManager.Instance.GetString("015"); }
		}

		internal static string InvalidMappingFileFormat
		{
			get { return OResourceManager.Instance.GetString("016"); }
		}

		internal static string UnnamedMappingInFileFormat
		{
			get { return OResourceManager.Instance.GetString("017"); }
		}

		internal static string SenderNotSpecified
		{
			get { return OResourceManager.Instance.GetString("018"); }
		}

		internal static string ReceiverNotSpecified
		{
			get { return OResourceManager.Instance.GetString("019"); }
		}

		internal static string MoreThanOneFormat
		{
			get { return OResourceManager.Instance.GetString("020"); }
		}

		internal static string OutOfRangeFormat
		{
			get { return OResourceManager.Instance.GetString("021"); }
		}

		internal static string NoDefaultDatabase
		{
			get { return OResourceManager.Instance.GetString("022"); }
		}

        internal static string NotInstantiated
        {
            get { return OResourceManager.Instance.GetString("023"); }
        }

        internal static string EqualToOrLessThanZero
        {
            get { return OResourceManager.Instance.GetString("025"); }
        }

        /// <summary>
        /// Returns common error message when there is no default connection name being set. No param required.
        /// </summary>
        internal static string NoDefaultConnectionName
        {
            get { return OResourceManager.Instance.GetString("027"); }
        }

        /// <summary>
        /// Returns common error message when specified type is not compatible.
        /// Expected params: (0) current type (1) expected type
        /// </summary>
        internal static string IncompatibleType
        {
            get { return OResourceManager.Instance.GetString("028"); }
        }

        /// <summary>
        /// Returns common error message if specified type is not an enum type.
        /// Expected params: (0) type name
        /// </summary>
        internal static string InvalidEnumType
        {
            get { return OResourceManager.Instance.GetString("029"); }
        }

        /// <summary>
        /// Returns common error message if specified value is not a valid value of specified type.
        /// Expected params: (0) type value (1) type name
        /// </summary>
        internal static string InvalidEnumValue
        {
            get { return OResourceManager.Instance.GetString("030"); }
        }

        /// <summary>
        /// Returns common error message if something is not set yet.
        /// Expected params: (0) something to set
        /// </summary>
        internal static string NotSet
        {
            get { return OResourceManager.Instance.GetString("032"); }
        }

        /// <summary>
        /// Returns common error message if user is unathorized to perform an operation.
        /// Expected params: (0) user
        /// </summary>
        internal static string NotAuthorisedUser
        {
            get { return OResourceManager.Instance.GetString("033"); }
        }

        /// <summary>
        /// Returns common error message if it is an invalid role name.
        /// Expected params: (0) role name
        /// </summary>
        internal static string InvalidRoleName
        {
            get { return OResourceManager.Instance.GetString("034"); }
        }

        /// <summary>
        /// Returns common error message if more than one admin roles found.
        /// </summary>
        internal static string MultipleAdminRolesFound
        {
            get { return OResourceManager.Instance.GetString("035"); }
        }

        #endregion

        #region Public

        /// <summary>
        /// Returns common error message when something already exists.
        /// Expected param: (0) something that already exists.
        /// </summary>
        public static string AlreadyExists
        {
            get { return OResourceManager.Instance.GetString("038"); }
        }

        /// <summary>
        /// Returns common error message when a list contains null or empty value.
        /// Expected param: (0) something that contains null or empty value.
        /// </summary>
        public static string ContainsNullOrEmpty
        {
            get { return OResourceManager.Instance.GetString("042"); }
        }

        /// <summary>
        /// Returns common error message if system failure occurs.
        /// Expected param: (0) failed action
        /// </summary>
        public static string Failure
        {
            get { return OResourceManager.Instance.GetString("036"); }
        }

        /// <summary>
        /// Returns common error message when something is invalid.
        /// Expected param: (0) something that is not valid.
        /// </summary>
        public static string Invalid
        {
            get { return OResourceManager.Instance.GetString("040"); }
        }

        /// <summary>
        /// Returns common error message when something is null or empty.
        /// Expected param: something that is null or empty.
        /// </summary>
        public static string IsNullOrEmpty
        {
            get { return OResourceManager.Instance.GetString("024"); }
        }

        /// <summary>
        /// Returns common error message when system unexpectedly returns more than one results.
        /// Expected param: (0) what was found.
        /// </summary>
        public static string MoreThanOneFound
        {
            get { return OResourceManager.Instance.GetString("037"); }
        }

        /// <summary>
        /// Returns common error message when something does not exist.
        /// Expected param: (0) something that does not exist.
        /// </summary>
        public static string NotExists
        {
            get { return OResourceManager.Instance.GetString("039"); }
        }

        /// <summary>
        /// Returns common error message when something does not exist in something.
        /// Expected param: (0) something that does not exist (1) in what.
        /// </summary>
        public static string NotExistsIn
        {
            get { return OResourceManager.Instance.GetString("041"); }
        }

        /// <summary>
        /// Returns common error message when there is specified type has no implementation.
        /// Expected param: type.
        /// </summary>
        public static string TypeNotSupported
        {
            get { return OResourceManager.Instance.GetString("026"); }
        }

        #endregion
    }
}
